package com.example.client;

import com.example.common.Result;
import com.example.entity.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "cloud-product-service")
public interface ProductClient {
    @GetMapping("/product/get/{id}")
    Result<Product> getProductById(@PathVariable("id") Long id);

    @PutMapping("/product/stock/{id}/{quantity}")
    Result<Boolean> updateStock(@PathVariable("id") Long id, @PathVariable("quantity") int quantity);
} 